package com.spsy.order.service.impl;

import java.util.List;
import com.spsy.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spsy.order.mapper.OrderLogMapper;
import com.spsy.order.domain.OrderLog;
import com.spsy.order.service.IOrderLogService;

/**
 * 订单操作日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-06
 */
@Service
public class OrderLogServiceImpl implements IOrderLogService 
{
    @Autowired
    private OrderLogMapper orderLogMapper;

    /**
     * 查询订单操作日志
     * 
     * @param id 订单操作日志主键
     * @return 订单操作日志
     */
    @Override
    public OrderLog selectOrderLogById(Long id)
    {
        return orderLogMapper.selectOrderLogById(id);
    }

    /**
     * 查询订单操作日志列表
     * 
     * @param orderLog 订单操作日志
     * @return 订单操作日志
     */
    @Override
    public List<OrderLog> selectOrderLogList(OrderLog orderLog)
    {
        return orderLogMapper.selectOrderLogList(orderLog);
    }

    /**
     * 新增订单操作日志
     * 
     * @param orderLog 订单操作日志
     * @return 结果
     */
    @Override
    public int insertOrderLog(OrderLog orderLog)
    {
        orderLog.setCreateTime(DateUtils.getNowDate());
        return orderLogMapper.insertOrderLog(orderLog);
    }

    /**
     * 修改订单操作日志
     * 
     * @param orderLog 订单操作日志
     * @return 结果
     */
    @Override
    public int updateOrderLog(OrderLog orderLog)
    {
        return orderLogMapper.updateOrderLog(orderLog);
    }

    /**
     * 批量删除订单操作日志
     * 
     * @param ids 需要删除的订单操作日志主键
     * @return 结果
     */
    @Override
    public int deleteOrderLogByIds(Long[] ids)
    {
        return orderLogMapper.deleteOrderLogByIds(ids);
    }

    /**
     * 删除订单操作日志信息
     * 
     * @param id 订单操作日志主键
     * @return 结果
     */
    @Override
    public int deleteOrderLogById(Long id)
    {
        return orderLogMapper.deleteOrderLogById(id);
    }
}
